package com.home.security.browser.auth.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Description:
 * Created by 王大宸 on 2020-10-08 16:07
 * Created with IntelliJ IDEA.
 */
@Table(name = "base_role")
public class SysRole implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    private String id;

    /**
     * 角色名称
     */
    @Column(name = "name")
    @NotBlank(message = "角色名称不能为空！")
    private String name;

    /**
     * 描述
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 部门id
     */
    @Column(name = "depart_id")
    private String departId;


    @Column(name = "create_user")
    private String createUser;


    @Column(name = "create_time")
    private LocalDateTime createTime;


    @Column(name = "update_user")
    private String updateUser;


    @Column(name = "update_time")
    private LocalDateTime updateTime;


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    public String getDepartId() {
        return departId;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("remark", getRemark())
                .append("departId", getDepartId())
                .append("createUser", getCreateUser())
                .append("createTime", getCreateTime())
                .append("updateUser", getUpdateUser())
                .append("updateTime", getUpdateTime())
                .toString();
    }

}
